<!-- 领取记录 -->
<!-- 优惠券 -->
<script lang="ts">
export default {
  name: "discountCouponList",
};
</script>
<template>
  <div class="page-box h100 display-flex czbj">
    <p class="title-label mb10">
     优惠券
    </p>
    <div>
      <dxtable :headBtn="headBtn" :dataJson="dataJson" :portUrl="portUrl" :qx="qx" ref="databale"
      :hidebj="true"></dxtable>
    </div>
  </div>

</template>
<script lang='ts' setup>
import dxtable from "../../../components/util/dxtable.vue";
import sort from "../../../components/util/sort.vue";
import { dxget, dxpost, qurl, hf } from "../../../util/index";
import { h, ref, reactive, onBeforeUpdate } from "vue";
const props = defineProps({
  pup: { type: String },
});
const showModal = ref(false)
const qcosertt = ref()
let portUrl = "yuyue/adminapi/userLqjl";
let headBtn = [];
const zdList = ref()
const databale = ref();
const videourl = ref()
const typeli = ref([])
const initeer = () => {
  databale.value.initDataExpose();
};
const emit = defineEmits(["callBack"]);
// 弹窗公用该列表
let dataJson = reactive([
  {
    title: "id",
    key: "id",
    width: 50,
  },
  {
    title: "用户昵称",
    key: "nickname",
    width: 400,
  },
  {
    title: "优惠券名称",
    key: "name",
  },  {
    title: "面值",
    key: "couponFaceValue",
  },{
    title: "是否使用",
    key: "ystate",
    render:(row)=>{

      return row.ystate==1?'未使用':'已使用'
    }
  },


  
  
]);

const qx = {
  DeletePermissionID: "discountCouponListdel2", //删除
  EditPermissionIdentifier: "discountCouponListbj2", // 编辑
  NewPermissionIdentifier: "discountCouponListxz2", // 新建
  ViewPermissionID: "discountCouponListck2", // 查看
};
const getcasetype = async () => {
  const { data }: any = await dxget("dxgjAdmin/getzd", { name: 'yyzjfl' })

  dataJson[5].options = [
    {
      label: "全部",
      value: ""
    },
    ...data
  ]
  typeli.value = data
  // ishjwoer.value = true
}
getcasetype()

</script>
<style scoped>
.fsdfereertr{
  width: 100%;
  height: 360px;
}
</style>
  
  
  